package com.sailorj.medical.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import com.sailorj.medical.domain.medical.*;
import java.util.List;
/**
 * 基础数据查询DAO类
 */
public class ItemDao extends GenericDao<Item> {

	@Override
	protected Item handle(ResultSet rs) throws SQLException {
		Item entity=new Item();
		entity.setItemcode(rs.getString("itemcode"));
		entity.setItemname(rs.getString("itemname"));
		entity.setType(rs.getString("type"));
		return entity;
	}
	
	public List<Item> findListByType(String type)throws SQLException{
	
		String sql="select * from t_item where type=?";
		Object[]params={type};
		return super.queryOjects(sql, params);
	}

}
